/*
 * Copyright (c) 2011 Team A CS2340. All rights reserved.
 */

package edu.gatech.teama.doctorsoffice.model;

import java.io.IOException;
import java.util.logging.FileHandler;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * UrineTest.java: stores results of a urine test 
 * @author Team A
 * @version 1.0
 *
 */
public class UrineTest extends LabWork {

	/**
	 * results of the urine test
	 */
	private final String results;
	
	/**
	 * Logger for all <code>PatientInstructions</code> instances.
	 */
	private static final Logger LOGGER =
		Logger.getLogger("edu.gatech.teama.doctorsoffice.model.UrineTest");

	static {
        FileHandler fh = null;
        try {
            fh = new FileHandler("application.log");
        } catch (SecurityException e) {
            LOGGER.log(Level.SEVERE, "Security Exception creating the logger " +
            		"file handler");
            e.printStackTrace();
        } catch (IOException e) {
            LOGGER.log(Level.SEVERE, "IO Exception creating the logger file handler");
            e.printStackTrace();
        }

        LOGGER.addHandler(fh);
        LOGGER.setLevel(Level.ALL);
    }
	
	/**
	 * Result of the urine test
	 * @param results
	 */
	public UrineTest(String results) {
		this.results = results;
	}
	
	/**
	 * Gives summary results of urine test
	 * @return results
	 */
	@Override
	public String summary() {
		return results;
	}

}
